Data processing systems typically include several data processors interconnected via a network for data communication, wherein one or more of the data processors include at least one data storage device. Upon a request from a requester processor, data is retrieved from a data storage device of a data processor and a checksum is generated for the retrieved data. The retrieved data and checksum are then transferred to the requester, wherein the requester computes a checksum for the received data and compares it to the received checksum to detect end-to-end data transfer errors.
A major disadvantage of conventional techniques for generating checksums is that such checksums are calculated using software routines as a separate pass over the data retrieved from the data-storage device before the data is transferred to the requester. Specifically, the software checksum calculation occurs after the retrieved data is stored in a buffer memory, and before the retrieved data is transferred to the requester. The process for performing the software checksum is executed on a processor unit, such as a 32-bit central processing unit (CPU). The overhead for software checksum calculation can be for example nineteen CPU instructions to checksum thirty two bytes of data. As such, the software checksum calculation consumes precious computing time and resources. Such high overhead degrades data communication response, and negatively impacts the performance of data processing systems.
There is, therefore, a need for a method and apparatus to efficiently determine checksums for data retrieved from data storage devices.